#pragma once


#include<iostream>
#include <string>
#include "../client/request/add_contact_request.pb.h"

const std::string dbFile = "contacts.txt"; 


class ContactStorage
{
public:
    // 保存联系人到文件 (UTF-8 文本)
    static void saveContact(const add_contact_req::AddContactRequest& contact,const std::string& uid);

    static bool deleteContact(const std::string& uid) ;

    static bool findContactByName(const std::string& name,
                              add_contact_req::AddContactRequest& out,
                              std::string& uid);

     static bool findAllContacts(std::vector<add_contact_req::AddContactRequest>& outList,
                                std::vector<std::string>& uids);
};